package com.smedi.ismedi.progress.core.application.service;

import com.smedi.ismedi.progress.core.application.command.ProgressReportExportQuery;
import com.smedi.ismedi.progress.core.application.command.ProgressReviewProjectCommand;
import com.smedi.ismedi.progress.core.application.command.ProgressViewCommand;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.Progress;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProgressReport;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProjectOne;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.WeekMonthReportEidt;
import org.springframework.http.ResponseEntity;

import java.io.IOException;

/**
 * 进度管理应用服务接口
 *
 * @author pengyan
 * @date 2022/09/19
 */
public interface ProgressReportApplicationService {


    ProjectOne projectInformation(ProgressViewCommand progressViewCommand);

    ProgressReport reviewWeekReportInstitution(ProgressReviewProjectCommand progressReviewProjectCommand);

    ProgressReport reviewMonthReportInstitution(ProgressReviewProjectCommand progressReviewProjectCommand);

    ResponseEntity<byte[]> progressMonthWeekReportBatchExport(ProgressReportExportQuery progressReportExportQuery) throws IOException;
    String monthWeekReportSaveDraftAndRelease(WeekMonthReportEidt weekMonthReportEidt);


    /**
     * 进度周报，每个建设中项目，每周日6点还未发布（包含休息日、节假日）
     * @return
     */
    Boolean weekReportNews();

    /**
     * 进度月报，每个建设中项目，每月18号6点还未发布（包含休息日、节假日）
     * @return
     */
    Boolean monthReportNews();

    /**
     * 周月报自动审批退回
     * @param versionManage
     */
    void AutoApproveReturn(Progress versionManage);

    /**
     * 进度月报，每个有进度计划、未实际完工的项目，每月18号6点还未创建（包含休息日、节假日)
     * @return
     */
    Boolean monthReportContext();

    /**
     * 给施工项目经理发消息（进度计划撤销）
     * @param projectId
     */
    void sendMessageNotifyProjectManagerRole(Long projectId);
}
